package net.dopan.pigframe.user.model.entity;

import com.baomidou.mybatisplus.activerecord.Model;
import com.baomidou.mybatisplus.annotations.TableField;
import com.baomidou.mybatisplus.annotations.TableId;
import com.baomidou.mybatisplus.annotations.TableName;
import com.baomidou.mybatisplus.enums.IdType;
import lombok.*;

import java.io.Serializable;

/**
 * @author wufeihong
 * 用户笔记表
 */
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
@EqualsAndHashCode(callSuper = true)
@TableName("user_note")
public class UserNote extends Model<UserNote> {

  private static final long serialVersionUID = 1L;

  /**
   * 笔记Id
   */
  @TableId(value = "note_id", type = IdType.AUTO)
  private long noteId;
  @TableField("user_id")
  private long userId;
  @TableField("note_url")
  private String noteUrl;

  @Override
  protected Serializable pkVal() {
    return this.noteId;
  }
}
